export const NOT_LOADED = "NOT_LOADED"; // 初始状态
export const LOADING_SOURCE_CODE = "LOADING_SOURCE_CODE"; // 加载资源
export const NOT_BOOTSTRAPPED = "NOT_BOOTSTRAPPED"; //在 bootstrap 之前
export const BOOTSTRAPPING = "BOOTSTRAPPING"; // bootstrap
export const NOT_MOUNTED = "NOT_MOUNTED"; // mount 之前
export const MOUNTING = "MOUNTING"; // mount 时
export const MOUNTED = "MOUNTED"; // mount 完毕 
export const UPDATING = "UPDATING"; // 更新中 
export const UNMOUNTING = "UNMOUNTING"; // 解除挂载
export const UNLOAD = "UNLOAD";
export const LOAD_ERR = "LOAD_ERR";
export const SKIP_BECAUSE_BROKEN = "SKIP_BECAUSE_BROKEN";


// 是否已经被激活
export function isActive(app){
    return app.status = MOUNTED;
}

// 是否需要被激活
export function shouldActive(app){
    return app.activeWhen(window.location)
}